#pragma once

#include <vex/functional/contract/signal_connection.h>
#include <boost/signals2/connection.hpp>

namespace vex { namespace functional { namespace implementation {
    namespace bs2 = boost::signals2;
    class VEX_ABSTRACT bs2_connection_impl : public contract::signal_connection {
        bs2::connection m_connection;
    protected:
        bs2_connection_impl(bs2::connection const & p_conn)
            : m_connection(p_conn) {}

        bs2_connection_impl(bs2::connection&& p_conn)
            : m_connection(std::move(p_conn)) {}
    public:
        virtual void disconnect()
        {
            m_connection.disconnect();
        }
    };
}}}